Re: [Rpm-maint] [rpm-software-management/rpm] Convert output to the current locale (#250)
The more modern interface is iconv(3). Here is the basic algorithm. The right implementation adds what is known as a header format extension to convert the encoding of any output displayed by rpm --query (aka headerSprintf() ...). hth [iconv.code.gz](https://github.com/rpm-software-management/rpm/files/1146620/iconv.code.gz) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/250#issuecomment-315197780___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Don't modify interupts if db is read only (#251)
Sigh ... there are much better fixes for ^C handling than reopening an rpmdb (where ^C will *still* be disabled while installing). For starters, the signal handling in RPM was designed to be polled at code points where the rpmdb is known to be consistent (for a graceful exit with an rpmdbClose when that makes sense). Adding the poll in 10-15 places in rpm code SHOULD lead to reasonable ^C handling (i.e. responsiveness in seconds, not minutes) as well as no rpmdb stateful problems. Run a list of packages that haven't been successfully upgraded and remove on exit if you want to start towards transactional durability. There is also an approach using atexit(2), as well as an approach with chained signal handlers (but that will likely need collusion with depsolvers that use rpmlib). The entire issue is that SOME application MUST call rpmdbClose as part of ^C handling. Pretending that O_RDONLY doesn't write locks in the dbenv (including the transaction lock) when run as root is an act of ignorant denial. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/251#issuecomment-315191663___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
simotek commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ Ok, i'll upstream that patch alongside this one tomorrow. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#discussion_r127202067___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
mlschroe commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ No, rpm currently does not use the sha sig to test if this is a "reinstall" or an update/downgrade. The weird update/reinstall difference is a mess but it seems that it has to stay for compatibility reasons. This is about the addSelfErasures code. When you have foo-1-1.i586 installed and you do 'rpm -U foo-1-1.i686', rpm will not add an erase element for the i586 package. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#discussion_r127199181___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
simotek commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ >From reading https://bugzilla.redhat.com/show_bug.cgi?id=104066 the >nameversioncomprare.diff patch shouldn't be needed anymore, our packages have >a SHA1 signature, does that mean we also wouldn't need this patch? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#discussion_r127195580___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
mlschroe commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ No, please don't, the comment is correct. We do have rpmNameVersionCompare in depends.c. See the nameversioncompare.diff patch... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#discussion_r127192923___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Don't modify interupts if db is read only (#251)
Ok i'll update the commit message as a starting point, the original patch was quite different but it doesn't seem like this has been covered in the latest version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/251#issuecomment-315049665___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Don't modify interupts if db is read only (#251)
It's done so that ^C exists rpm if in read-only mode. I don't know how it interacts with the db-env, SUSE only uses DB_PRIVATE. Panu also changed the signal handling quite a bit recently, so it may well be that the patch is no longer needed. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/251#issuecomment-315048249___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
simotek commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ Thanks, this was quite an old patch, will update it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#discussion_r127189405___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Correctly detect Transmeta Crusoe as i686 (#254)
Conan-Kudo approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/254#pullrequestreview-49743562___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Correctly detect Transmeta Crusoe as i686 (#254)
simotek commented on this pull request. > @@ -1103,6 +,12 @@ static void defaultMachine(rpmrcCtx ctx, const char ** > arch, const char ** os) # endif # endif +#if defined(__linux__) + /* in linux, lets rename parisc to hppa */ + if (rstreq(un.machine, "parisc")) + strcpy(un.machine, "hppa"); Done -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/254#discussion_r127185577___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Don't modify interupts if db is read only (#251)
@mlschroe do you happen to remember what this was fixing? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/251#issuecomment-315037096___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
Conan-Kudo commented on this pull request. > /* XXX shouldn't we also do this on colorless transactions? */ if (rpmtsColor(ts)) { - rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te)); rpmdbSetIteratorRE(mi, RPMTAG_OS, RPMMIRE_STRCMP, rpmteO(te)); Shouldn't all of this be tested regardless of color? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#pullrequestreview-49725112___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Correctly detect Transmeta Crusoe as i686 (#254)
Conan-Kudo requested changes on this pull request. Could you please split the unrelated change in this patch into another PR? I know it's trivial, but let's not have them bundled up for no reason. > @@ -1103,6 +,12 @@ static void defaultMachine(rpmrcCtx ctx, const char ** > arch, const char ** os) # endif # endif +#if defined(__linux__) + /* in linux, lets rename parisc to hppa */ + if (rstreq(un.machine, "parisc")) + strcpy(un.machine, "hppa"); This feels like an unrelated change. As far as I know the Crusoe has nothing to do with `hppa`... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/254#pullrequestreview-49724520___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
ignatenkobrain commented on this pull request. > @@ -511,13 +511,14 @@ void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t > amount) */ static void markReplacedInstance(rpmts ts, rpmte te) { +/* this must match rpmNameVersionCompare in depends.c */ I think you meant checkProblems() in transaction.c -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#pullrequestreview-49722721___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Also test architecture in "refresh" test when not colored. (#253)
ignatenkobrain commented on this pull request. > rpmdbMatchIterator mi = rpmtsInitIterator(ts, RPMDBI_NAME, rpmteN(te), > 0); rpmdbSetIteratorRE(mi, RPMTAG_EPOCH, RPMMIRE_STRCMP, rpmteE(te)); rpmdbSetIteratorRE(mi, RPMTAG_VERSION, RPMMIRE_STRCMP, rpmteV(te)); rpmdbSetIteratorRE(mi, RPMTAG_RELEASE, RPMMIRE_STRCMP, rpmteR(te)); +rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te)); this is not aligned with checkProblems() in transaction.c... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/253#pullrequestreview-49722810___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Don't modify interupts if db is read only (#251)
I would be happy if commit message was explaining problem... Though code looks good -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/251#issuecomment-315022545___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint