From: Alexey Tourbin <alexey.tourbin@gmail.com> To: devel@lists.altlinux.org Subject: [devel] удволетворение зависимостей в новом rpm Date: Sun, 28 May 2017 09:10:37 +0300 Message-ID: <20170528061036.GA31735@celery> (raw) Уважаемые мужчины, жители Энрофа! Я заметил, что ваш новый rpm, когда видит зависимость с версией, Requires: foo >= VER, считает ее удволетворенной даже тогда, когда имя foo предоставлено без версии, Provides: foo. $ cat foo.spec Name: foo Version: 1.0 Release: alt0 Summary: foo package License: GPL Group: System Requires: python2.7(pwd) > 666 %description %files $ rpm -bb foo.spec Processing files: foo-1.0-alt0 Requires: python2.7(pwd) > 666 Wrote: /home/at/RPM/RPMS/x86_64/foo-1.0-alt0.x86_64.rpm $ rpm -iv --test /home/at/RPM/RPMS/x86_64/foo-1.0-alt0.x86_64.rpm Preparing packages... Running /usr/lib/rpm/posttrans-filetriggers $ apt-get --dry-run install /home/at/RPM/RPMS/x86_64/foo-1.0-alt0.x86_64.rpm Reading Package Lists... Done Building Dependency Tree... Done Selecting foo for '/home/at/RPM/RPMS/x86_64/foo-1.0-alt0.x86_64.rpm' The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 removed and 688 not upgraded. Inst foo (1.0-alt0 localhost) Conf foo (1.0-alt0 localhost) $ rpm -q --whatprovides --provides 'python2.7(pwd)' |grep -w pwd python2.7(pwd) А узнал я об этом почти что случайно, в результате того, что от безделия просматривал код rpmds.c. Как писал Чехов, однажды, лежа на диванчике и читая код rpmds.c, с меня слетела шляпа. /usr/src/debug/rpm-4.13.0/lib/rpmds.c: 1148 if (!(AEVR && *AEVR && BEVR && *BEVR)) { 1149 /* If either EVR is non-existent or empty, always overlap. */ 1150 result = 1; 1151 } else { 1152 /* Both AEVR and BEVR exist, compare [epoch:]version[-release]. */ 1153 result = rpmdsCompareEVR(AEVR, AFlags, BEVR, BFlags, B->nopromote); 1154 } Надо ли говорить, что такое сравнение версий кажется мне вызывающе и абсурдно неправильным, и что раньше так не было. (hasher инициализирован из репозитория p8) $ hsh-install /home/at/RPM/RPMS/x86_64/foo-1.0-alt0.x86_64.rpm error: failed dependencies: python2.7(pwd) > 666 is needed by foo-1.0-alt0 hsh-install: Packages installation failed.
reply other threads:[~2017-05-28 6:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170528061036.GA31735@celery \ --to=alexey.tourbin@gmail.com \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git