From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 15 May 2009 20:31:38 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20090515163138.GH10323@altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <4A0C691F.5040803@altlinux.com> <200905151325.40405.zerg@altlinux.org> <20090515152627.GD6065@wrars-comp.wrarsdomain> <20090515154543.GC18230@wo.int.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qVyHzDF4yf4A8jkR" Content-Disposition: inline In-Reply-To: <20090515154543.GC18230@wo.int.altlinux.org> Subject: Re: [devel] =?koi8-r?b?Z2lyYXItYnVpbGRlciBGUjog99nXz8TJ1Ngg19LFzdEg?= =?koi8-r?b?1yDQ0s/XxdLLxSDOwSDV09TBzsHXzMnXwcXNz9PU2C4=?= X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 16:32:38 -0000 Archived-At: List-Archive: List-Post: --qVyHzDF4yf4A8jkR Content-Type: multipart/mixed; boundary="/9ZOS6odDaRI+0hI" Content-Disposition: inline --/9ZOS6odDaRI+0hI Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 15, 2009 at 07:45:43PM +0400, Dmitry V. Levin wrote: > On Fri, May 15, 2009 at 09:26:27PM +0600, Andrey Rahmatullin wrote: > > On Fri, May 15, 2009 at 01:25:33PM +0000, Sergey V Turchin wrote: > > > =F3=C2=CF=D2=CB=C1 =DA=C1=CB=CF=CE=DE=C9=CC=C1=D3=D8 =D0=D2=C9=CD=C5= =D2=CE=CF 14-May-2009 16:23 > > > task =DA=C1=CB=CF=CE=DE=C9=CC=D3=D1 =D0=D2=C9=CD=C5=D2=CE=CF 15-Ma= y-2009 08:46 > > =E9 =DE=CF =CF=CE=CF =D4=C1=CB =C4=CF=CC=C7=CF =C4=C5=CC=C1=CC=CF? >=20 > =F4=C5=D3=D4=C9=D2=CF=D7=C1=CC=CF =D5=D3=D4=C1=CE=CF=D7=CB=D5 804 =C2=C9= =CE=C1=D2=CE=D9=C8 =D0=C1=CB=C5=D4=CF=D7 (15 =DE=C1=D3=CF=D7 47 =CD=C9=CE= =D5=D4 03 =D3=C5=CB=D5=CE=C4=D9), > =D7 =D3=D2=C5=C4=CE=C5=CD =CF=CB=CF=CC=CF 70 =D3=C5=CB=D5=CE=C4 =CE=C1 1 = =D0=C1=CB=C5=D4 (=D5=D3=D4=C1=CE=CF=D7=CB=C1 =C2=C1=DA=CF=D7=CF=C7=CF =DE= =D2=D5=D4=C1, =D5=D3=D4=C1=CE=CF=D7=CB=C1 > =D7 =CE=C5=C7=CF =D0=C1=CB=C5=D4=C1 =D3=CF =D7=D3=C5=CD=C9 =C5=C7=CF =DA= =C1=D7=C9=D3=C9=CD=CF=D3=D4=D1=CD=C9, =D5=C4=C1=CC=C5=CE=C9=C5 =DE=D2=D5=D4= =C1). =F1 =C2=CF=C0=D3=D8, =DE=D4=CF =C2=CF=CC=D8=DB=D5=C0 =D0=CF=CC=CF=D7=C9=CE= =D5 =D7=D2=C5=CD=C5=CE=C9 =D4=C1=CD =CE=C1 =D3=C1=CD=CF=CD =C4=C5=CC=C5 =D3= =CB=D5=DB=C1=CC=C1 =D0=D2=CF=D7=C5=D2=CB=C1, =D7 =CB=CF=D4=CF=D2=CF=CA =C9=D3=D0=CF=CC=D8=DA= =D5=C5=D4=D3=D1 --whatprovides. $ hsh --init --no-stuff =2E.. $ hsh-run --rooter find / >$TMPDIR/out find: /.out: Permission denied find: /.host: Permission denied $ time xargs --delimiter=3D'\n' <$TMPDIR/out hsh-run --rooter -- rpmquery -= -whatprovides >/dev/null warning: no package provides / warning: no package provides /usr/share/info/autoconf.info.gz warning: no package provides /usr/share/info/automake.info.gz warning: no package provides /usr/share/man/man1/autoconf.1.gz warning: no package provides /usr/share/man/man1/autoheader.1.gz warning: no package provides /usr/share/man/man1/autom4te.1.gz warning: no package provides /usr/share/man/man1/autoreconf.1.gz warning: no package provides /usr/share/man/man1/autoscan.1.gz warning: no package provides /usr/share/man/man1/autoupdate.1.gz warning: no package provides /usr/share/man/man1/config.guess.1.gz warning: no package provides /usr/share/man/man1/config.sub.1.gz warning: no package provides /usr/share/man/man1/ifnames.1.gz warning: no package provides /usr/bin/pydoc warning: no package provides /usr/src/RPM warning: no package provides /usr/src/RPM/RPMS warning: no package provides /usr/src/RPM/RPMS/noarch warning: no package provides /usr/src/RPM/SRPMS warning: no package provides /usr/src/RPM/SPECS warning: no package provides /usr/src/RPM/SOURCES warning: no package provides /usr/src/RPM/BUILD warning: no package provides /usr/src/.xsession.d warning: no package provides /usr/src/.rpmmacros =2E.. warning: no package provides /dev warning: no package provides /dev/log warning: no package provides /dev/random warning: no package provides /dev/urandom warning: no package provides /dev/full warning: no package provides /dev/zero warning: no package provides /dev/null error: file /dev/stderr: No such file or directory error: file /dev/stdout: No such file or directory error: file /dev/stdin: No such file or directory error: file /dev/fd: No such file or directory warning: no package provides /dev/pts warning: no package provides /.in warning: no package provides /.host Command exited with non-zero status 123 95.34user 110.46system 4:21.10elapsed 78%CPU (0avgtext+0avgdata 0maxresiden= t)k 0inputs+0outputs (0major+12376937minor)pagefaults 0swaps $ =EF=C4=CE=C1 =C9=DA =D0=D2=CF=C2=CC=C5=CD =D3=CF =D3=CB=CF=D2=CF=D3=D4=D8= =C0 =DA=C4=C5=D3=D8 =D7 =D4=CF=CD, =DE=D4=CF rpmquery =C4=CC=D1 =CB=C1=D6= =C4=CF=C7=CF =C1=D2=C7=D5=CD=C5=CE=D4=C1 =D7=D3=C5=C7=C4=C1 =D7=D9=CE=C9=CD=C1=C5=D4 =C8= =C5=C4=C5=D2 =C9=DA =C2=C1=DA=D9 Packages, =C9 =C4=CC=D1 =CD=CE=CF=C7=C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, =C4=C1= =D6=C5 =CE=C5 =D7 =C4=D7=C1 =D2=C1=DA=C1. $ time xargs --delimiter=3D'\n' <$TMPDIR/out hsh-run --rooter -- ./qf-or-wh= atprovides-check =2E.. warning: file /.in is not owned by any package warning: file /.host is not owned by any package Command exited with non-zero status 123 76.30user 72.44system 3:31.91elapsed 70%CPU (0avgtext+0avgdata 0maxresident= )k 0inputs+0outputs (0major+7156556minor)pagefaults 0swaps $=20 =FA=CE=C1=DE=C9=D4, =D7=D9=CE=C9=CD=C1=CE=C9=C5 =C8=C5=C4=C5=D2=CF=D7 =CE= =C5 =D1=D7=CC=D1=C5=D4=D3=D1 =C7=CC=C1=D7=CE=D9=CD =D5=DA=CB=C9=CD =CD=C5= =D3=D4=CF=CD, =CB=C1=CB =D1 =D3=CE=C1=DE=C1=CC=C1 =C4=D5=CD=C1=CC. =E7=C4=C5-=D4=CF =C5=DD=A3 =D7= =D2=C5=CD=D1 =D5=D4=C5=CB=C1=C5=D4, =CE=C1=C4=CF =C2=D5=C4=C5=D4 =D0=D2=CF= =C6=C9=CC=C9=D2=CF=D7=C1=D4=D8. --/9ZOS6odDaRI+0hI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qf-or-whatprovides-check.c" #include #include #include #include #include #include int check_index(rpmdb db, rpmTag tag, const char *str) { rpmdbMatchIterator mi = rpmdbInitIterator(db, tag, str, 0); int count = rpmdbGetIteratorCount(mi); rpmdbFreeIterator(mi); return (count > 0) ? 0 : 1; } int qf_or_provides(rpmdb db, const char *path) { if (check_index(db, RPMTAG_BASENAMES, path) == 0) return 0; if (check_index(db, RPMTAG_PROVIDENAME, path) == 0) return 0; struct stat st; if (lstat(path, &st) == 0) fprintf(stderr, "warning: file %s is not owned by any package\n", path); else fprintf(stderr, "error: file %s: %m\n", path); return 1; } int main(int argc, char *argv[]) { rpmdb db = NULL; rpmReadConfigFiles(NULL, NULL); rpmdbOpen(NULL, &db, O_RDONLY, 0644); assert(db); int i, rc = 0; for (i = 1; i < argc; i++) rc |= qf_or_provides(db, argv[i]); return rc; } --/9ZOS6odDaRI+0hI-- --qVyHzDF4yf4A8jkR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkoNmOoACgkQfBKgtDjnu0adrwCfcg83JODWnNRk9sUAIx0dNFkL tK8AoMcnrL734v2Cf54B5Cdk27vhbAjV =sjFD -----END PGP SIGNATURE----- --qVyHzDF4yf4A8jkR--