Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 880197 Details for
Bug 1081622
mash keeps silly amount of drpms for rawhide
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to only copy drpms if they are new-ish.
0002-Only-copy-drpms-if-they-re-new-ish.patch (text/plain), 3.70 KB, created by
Ralph Bean
on 2014-03-29 17:14:48 UTC
(
hide
)
Description:
Patch to only copy drpms if they are new-ish.
Filename:
MIME Type:
Creator:
Ralph Bean
Created:
2014-03-29 17:14:48 UTC
Size:
3.70 KB
patch
obsolete
>From b75241ac2b48a563bcaba1fd4f477a59e56f4ac6 Mon Sep 17 00:00:00 2001 >From: Ralph Bean <rbean@redhat.com> >Date: Sat, 29 Mar 2014 13:12:04 -0400 >Subject: [PATCH 2/2] Only copy drpms if they're new-ish. > >--- > configs/rawhide.mash | 1 + > mash/__init__.py | 6 +++++- > mash/metadata.py | 19 +++++++++++++++---- > 3 files changed, 21 insertions(+), 5 deletions(-) > >diff --git a/configs/rawhide.mash b/configs/rawhide.mash >index 9fb389b..af25491 100644 >--- a/configs/rawhide.mash >+++ b/configs/rawhide.mash >@@ -16,6 +16,7 @@ repoviewtitle = "Fedora Rawhide - %(arch)s" > arches = i386 x86_64 armhfp > delta = True > max_delta_rpm_size = 800000000 >+#max_delta_rpm_age = 604800 > # Change distro_tags as fedora-release version gets bumped > distro_tags = cpe:/o:fedoraproject:fedora:21 rawhide > hash_packages = True >diff --git a/mash/__init__.py b/mash/__init__.py >index fdfc83d..997c0ce 100644 >--- a/mash/__init__.py >+++ b/mash/__init__.py >@@ -119,7 +119,11 @@ class Mash: > max_delta_rpm_size = self.config.max_delta_rpm_size > else: > max_delta_rpm_size = 300000000 >- md.set_delta(paths, max_delta_rpm_size) >+ if self.config.max_delta_rpm_age: >+ max_delta_rpm_age = self.config.max_delta_rpm_age >+ else: >+ max_delta_rpm_age = None # No age specified. Copy all. >+ md.set_delta(paths, max_delta_rpm_size, max_delta_rpm_age) > if previous: > md.set_previous(previous) > # Setup the distro tags >diff --git a/mash/metadata.py b/mash/metadata.py >index b8b8eb7..3158086 100644 >--- a/mash/metadata.py >+++ b/mash/metadata.py >@@ -1,7 +1,9 @@ > > import locale > import os >+import os.path > import shutil >+import time > > import rpm > import rpmUtils >@@ -65,7 +67,7 @@ class MetadataOld: > if skip: > self.args.append('--skip-stat') > >- def set_delta(self, deltapaths, max_delta_rpm_size): >+ def set_delta(self, deltapaths, max_delta_rpm_size, max_delta_rpm_age): > # Sorry, can't do that here. > pass > >@@ -127,11 +129,12 @@ class MetadataNew: > def set_skipstat(self, skip): > self.conf.skip_stat = skip > >- def set_delta(self, deltapaths, max_delta_rpm_size): >+ def set_delta(self, deltapaths, max_delta_rpm_size, max_delta_rpm_age): > if rpm.labelCompare([createrepo.__version__,'0','0'], ['0.9.7', '0', '0']) >= 0: > self.conf.deltas = True > self.conf.oldpackage_paths = deltapaths > self.conf.max_delta_rpm_size = max_delta_rpm_size >+ self.conf.max_delta_rpm_age = max_delta_rpm_age > > def set_previous(self, previous): > if rpm.labelCompare([createrepo.__version__,'0','0'], ['0.9.7', '0', '0']) >= 0: >@@ -170,6 +173,14 @@ class MetadataNew: > > def _copy(file, path): > destpath = '%s/drpms/%s' % (path, os.path.basename(file)) >+ >+ modified_time = os.path.getmtime(file) >+ age = time.time() - modified_time >+ >+ # If max_delta_rpm_age is None, then don't worry about it. >+ if self.conf.max_delta_rpm_age and age > self.conf.max_delta_rpm_age: >+ return >+ > try: > os.link(file, destpath) > except OSError: >@@ -231,8 +242,8 @@ class Metadata: > def set_skipstat(self, skip): > self.obj.set_skipstat(skip) > >- def set_delta(self, deltapaths, max_delta_rpm_size): >- self.obj.set_delta(deltapaths, max_delta_rpm_size) >+ def set_delta(self, deltapaths, max_delta_rpm_size, max_delta_rpm_age): >+ self.obj.set_delta(deltapaths, max_delta_rpm_size, max_delta_rpm_age) > > def set_previous(self, previous): > self.obj.set_previous(previous) >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1081622
:
880196
| 880197