Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
rpm
rpmqpack.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rpmqpack.diff of Package rpm
--- docs/man/CMakeLists.txt.orig 2024-02-07 13:36:51.000000000 +0000 +++ docs/man/CMakeLists.txt 2024-02-09 10:36:43.300952115 +0000 @@ -2,6 +2,7 @@ set(core gendiff.1 rpm2cpio.8 rpm.8 rpmbuild.8 rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 rpmdeps.8 rpmgraph.8 rpmlua.8 rpm-misc.8 rpmsort.8 + rpmqpack.8 ) set(extra rpm2archive.8 rpm-plugins.8 rpm-plugin-prioreset.8 rpm-plugin-syslog.8 --- docs/man/rpmqpack.8.orig 2024-02-09 10:36:43.300952115 +0000 +++ docs/man/rpmqpack.8 2024-02-09 10:36:43.300952115 +0000 @@ -0,0 +1,25 @@ +.TH RPMQPACK 8 "Mar 2002" +.SH NAME +rpmqpack \- check for installed rpm packages + +.SH SYNOPSIS +.B rpmqpack +.RI [ pack1 "] [" pack2 ]... + +.SH DESCRIPTION +rpmqpack checks if packages given as arguments are installed in +the system. It prints each installed package to stdout. +If no arguments are given all installed packages are printed. + +.SH EXIT STATUS +rpmqpack returns 0 if all given packages are installed, otherwise +1. + +.SH SEE ALSO +.BR rpm (1) + +.SH COPYRIGHT +2002 SUSE Linux AG Nuernberg, Germany. + +.SH AUTHOR +Michael Schroeder <mls@suse.de> --- tools/CMakeLists.txt.orig 2024-02-07 13:36:51.000000000 +0000 +++ tools/CMakeLists.txt 2024-02-09 10:37:32.932875459 +0000 @@ -7,6 +7,7 @@ add_executable(rpm2cpio rpm2cpio.c cliut add_executable(rpmsign rpmsign.c cliutils) add_executable(rpmbuild rpmbuild.c cliutils) add_executable(rpmspec rpmspec.c cliutils) +add_executable(rpmqpack rpmqpack.c) add_executable(rpmdeps rpmdeps.c) add_executable(rpmgraph rpmgraph.c) @@ -60,7 +61,7 @@ foreach(cmd rpmverify rpmquery) endforeach() install(TARGETS rpm rpmdb rpmkeys rpm2cpio rpmsign rpmbuild rpmspec - rpmlua rpmgraph + rpmlua rpmgraph rpmqpack ) install(TARGETS rpmdeps rpmuncompress DESTINATION ${RPM_CONFIGDIR}) --- tools/rpmqpack.c.orig 2024-02-09 10:36:43.300952115 +0000 +++ tools/rpmqpack.c 2024-02-09 10:36:43.300952115 +0000 @@ -0,0 +1,60 @@ +#include <sys/types.h> +#include <limits.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <rpm/rpmts.h> +#include <rpm/rpmdb.h> +#include <rpm/rpmmacro.h> + +int +main(int argc, char **argv) +{ + int ret = 0; + rpmts ts; + + rpmDefineMacro(NULL, "_dbpath /var/lib/rpm", 0); + ts = rpmtsCreate(); + if (!ts) + { + fprintf(stderr, "rpmtsCreate failed\n"); + exit(1); + } + if (rpmtsOpenDB(ts, O_RDONLY)) + { + perror("rpmtsOpenDB"); + exit(1); + } + if (argc <= 1) + { + rpmdbIndexIterator ii; + ii = rpmdbIndexIteratorInit(rpmtsGetRdb(ts), RPMDBI_NAME); + if (ii) + { + const void *key = 0; + size_t keylen = 0; + while ((rpmdbIndexIteratorNext(ii, &key, &keylen)) == 0) + printf("%*.*s\n", (int)keylen, (int)keylen, (char *)key); + } + rpmdbIndexIteratorFree(ii); + } + else + { + argc--; + while (argc--) + { + rpmdbMatchIterator mi; + argv++; + mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMDBI_NAME, (void *)*argv, strlen(*argv)); + if (mi && rpmdbGetIteratorCount(mi)) + printf("%s\n", *argv); + else + ret = 1; + rpmdbFreeIterator(mi); + } + } + rpmtsFree(ts); + return ret; +}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor