Re: [Rpm-maint] [rpm-software-management/rpm] Auto-enable optimizations for non-rotational disks on Linux (#949)

2020-02-13 Thread Panu Matilainen
Updated as per @ffesti's idea to always always push a value on the optimization 
macros so we can easily revert to original state by popping the macros. 

-- 
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/949#issuecomment-58573___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Auto-enable optimizations for non-rotational disks on Linux (#949)

2020-02-13 Thread Panu Matilainen
Feels awfully fiddly still, and somehow this makes me think there should be a 
new config value to enable the ssd autodetection, because otherwise to override 
its effect now you need to set *two* macros instead of just one. Which feels 
wrong.

One way around that would be only enabling minimize_writes now and worrying 
about other stuff later...

-- 
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/949#issuecomment-585768565___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-13 Thread Panu Matilainen
Do you have a case where the STRIP_TRAILINGSPACE thing actually makes a 
difference?
As commit b7d427728b8ba8734ba47d51849a5736bdd727cd where readManifest() is 
added notes:

>  STRIP_TRAILINGSPACE is a bit misleading here as it actually affects whether 
> a newline is added or not, but that's kind of consistent how its used 
> elsewhere.

There never was any handling for trailing spaces (beyond the newline) in the 
originating readFilesManifest() either, so I'm dubious.

-- 
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/1043#issuecomment-585776547___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use autodetect for _minimize_writes and _flush_io (#1066)

2020-02-13 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -745,12 +745,14 @@ package or when debugging this package.\
 %_pkgverify_flags 0x0
 
 # Set to 1 to minimize writing (at the cost of more reads) to
-# conserve eg SSD disks.
-%_minimize_writes  0
+# conserve eg SSD disks. Set to -1 for enabling when runnning on SSDs.
+# Set to 0 for always off.
+%_minimize_writes  -1

This will cause %_minimize_writes to be enabled by default because of how 
rpmtsCreate() initializes - any non-zero value will enable it. Which is not 
right, -1 should probably mean "autodetect", and 0 is explicit disable.

-- 
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/1066#pullrequestreview-358172534___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use autodetect for _minimize_writes and _flush_io (#1066)

2020-02-13 Thread Panu Matilainen
pmatilai commented on this pull request.



> + rpmPushMacro(NULL, "_minimize_writes", NULL, "1", 0);
+   } else {
+   char * val = rpmExpand("%{_minimize_writes}", NULL);
+   rpmPushMacro(NULL, "_minimize_writes", NULL, val, 0);
+   _free(val);
+   }
+   if (!rpmMacroIsDefined(NULL, "_flush_io") ||
+   rpmExpandNumeric("%{_flush_io}") == -1) {
+   rpmlog(RPMLOG_DEBUG,
+  "enabling _flush_io for non-rotational disks\n");
+   rpmPushMacro(NULL, "_flush_io", NULL, "1", 0);
+   } else {
+   char * val = rpmExpand("%{_flush_io}", NULL);
+   rpmPushMacro(NULL, "_flush_io", NULL, val, 0);
+   _free(val);
+   }

This is too copy-paste'y for my taste, but the idea seems sound. 

-- 
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/1066#pullrequestreview-358173137___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Auto-enable optimizations for non-rotational disks on Linux (#949)

2020-02-13 Thread Panu Matilainen
@pmatilai pushed 2 commits.

e966e703d1500d1050c238a50c4da48d0cc83c72  Only enable flush_io and 
minimize_writes on positive values
3ba2e8beb82b847af1b4bb6db48b2d88989fc45d  Auto-enable optimizations for 
non-rotational disks on Linux


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/949/files/94dfac0bfabeadde5ff9a4045ad871954adeb8b0..3ba2e8beb82b847af1b4bb6db48b2d88989fc45d
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use autodetect for _minimize_writes and _flush_io (#1066)

2020-02-13 Thread Panu Matilainen
pmatilai commented on this pull request.



>  
 # Set to 1 to flush file IO during transactions (at a severe cost in
-# performance for rotational disks)
-#%_flush_io0
+# performance for rotational disks). Set to -1 for enabling when running on
+# SSDs. Set to 0 for always off.
+%_flush_io -1

Same issue as with minimize_writes, the value of the macro is used as-is in fsm 
so any non-zero value will enable.
Which is probably equally wrong for both macros.

-- 
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/1066#pullrequestreview-358174035___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Cleanup fingerprint cache creation (#1068)

2020-02-13 Thread Michael Schroeder
Simplify the way the fingerprint cache is created.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1068

-- Commit Summary --

  * Move fingerprint hash setting out of fpLookupSubdir()
  * Remove duplicated code in fpLookupSubdir

-- File Changes --

M lib/fprint.c (156)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1068.patch
https://github.com/rpm-software-management/rpm/pull/1068.diff

-- 
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/1068
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] fsmMkdirs: Remove dnlx array (#1069)

2020-02-13 Thread Michael Schroeder
It gets only written to and nobody uses it, so be gone.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1069

-- Commit Summary --

  * fsmMkdirs: Remove dnlx array

-- File Changes --

M lib/fsm.c (8)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1069.patch
https://github.com/rpm-software-management/rpm/pull/1069.diff

-- 
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/1069
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fsmMkdirs: Remove dnlx array (#1069)

2020-02-13 Thread Michael Schroeder
@mlschroe pushed 1 commit.

c410531402fe2541566d16b963b1ed575cab8ea9  fsmMkdirs: Remove dnlx array


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1069/files/c5cebdd796fa39f86a4a1b6c9ad9c910842e6e92..c410531402fe2541566d16b963b1ed575cab8ea9
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] fsmMkdirs: Remove dnlx array (#1069)

2020-02-13 Thread Michael Schroeder
@mlschroe pushed 1 commit.

6232c8e1e515833f3a51af2800d3ab70d82a9e05  fsmMkdirs: do not dup the last 
verified directory name


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1069/files/c410531402fe2541566d16b963b1ed575cab8ea9..6232c8e1e515833f3a51af2800d3ab70d82a9e05
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-13 Thread Panu Matilainen
pmatilai commented on this pull request.



> +spec->lineNum, name, poptStrerror(rc));
+   goto exit;
+}
+
+optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
+while ((arg = poptGetNextOpt(optCon)) > 0) {
+
+   char * filename = poptGetOptArg(optCon);
+   if (!filename) {
+   rpmlog(RPMLOG_ERR,
+  _("line %d: \"%%%s -f\" requires an argument.\n"),
+  spec->lineNum, name);
+   goto exit;
+   }
+
+   addSource(spec, 0, filename, RPMTAG_SOURCE);

Mm. This is out of line with our -f usage elsewhere: we don't ask questions 
about the file origin external sources are pulled in, whether that's %include'd 
or pulled via -f from in scriptlet, files manifest or otherwise. Much less make 
them our own.

I can see a use-case for at least %patchlist -f (not so sure about %sourcelist 
-f), but these external entities are problematic in general as they break the 
standalone expectations that people have on specs. %include is notoriously 
nasty, so the question is do we really want more of that?

-- 
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/1043#pullrequestreview-358760663___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Handle Python extras trough reverse requirements encoded in provides (#1061)

2020-02-13 Thread Miro HronĨok
Nice finding.

-- 
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/issues/1061#issuecomment-585614753___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Discussion: How to handle Python extras (#1061)

2020-02-13 Thread Igor Gnatenko
You still need to be able to BR them because you'd want to run tests and 
whatnot.

-- 
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/issues/1061#issuecomment-585617337___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint