Diff:
---
 calm/calm.py                    | 2 +-
 calm/fix-requires-by-linkage.py | 6 +++++-
 calm/past_mistakes.py           | 1 -
 calm/repology.py                | 4 ++--
 calm/uploads.py                 | 4 ++++
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/calm/calm.py b/calm/calm.py
index 59a7211..82f460c 100755
--- a/calm/calm.py
+++ b/calm/calm.py
@@ -764,7 +764,7 @@ def do_daemon(args, state):
                                 # files in the arch directory
                                 if (filename != 'sha512.sum') and 
((path.count(os.path.sep) > depth) or filename == ".touch"):
                                     action |= Event.read_relarea
-                            elif path.startswith(args.stagingdir) and not 
path.endswith('/tmp'):
+                            elif path.startswith(args.stagingdir) and 
(filename == '.touch'):
                                 action |= Event.read_uploads
                             elif (path.startswith(args.homedir)) and (filename 
== ".sftp-session-close"):
                                 action |= Event.read_uploads
diff --git a/calm/fix-requires-by-linkage.py b/calm/fix-requires-by-linkage.py
index 62a2c33..fad43a7 100644
--- a/calm/fix-requires-by-linkage.py
+++ b/calm/fix-requires-by-linkage.py
@@ -115,7 +115,11 @@ def fix_hints(args):
                 if root.endswith('-src'):
                     continue
 
-                pn = root.rsplit('-', 2)[0]
+                # strip optional arch
+                pn = re.sub('-(' + '|'.join(common_constants.ARCHES) + ')$', 
'', root)
+
+                # strip version
+                pn = pn.rsplit('-', 2)[0]
 
                 # is pn in the list of packages (if specified)?
                 if args.package and (pn not in args.package):
diff --git a/calm/past_mistakes.py b/calm/past_mistakes.py
index a765074..fa23648 100644
--- a/calm/past_mistakes.py
+++ b/calm/past_mistakes.py
@@ -107,7 +107,6 @@ empty_but_not_obsolete = {
 # don't add to this list, fix the package
 maint_anomalies = {
     'manlint': ['1.6g-2'],  # unclear why this is under man
-    'python3-h5py-debuginfo': ['2.9.0-1'],  # superceded by 
python-h5py-debuginfo
 }
 
 # packages missing obsoletions
diff --git a/calm/repology.py b/calm/repology.py
index d6e74b4..34b69ac 100644
--- a/calm/repology.py
+++ b/calm/repology.py
@@ -218,10 +218,10 @@ def annotate_packages(args, packages):
         if repology_data:
             last_data = repology_data
 
+        last_check = time.time()
+
     for pn in last_data:
         spn = pn + '-src'
         if spn in packages:
             packages[spn].upstream_version = 
seqmatch(packages[spn].best_version, last_data[pn].upstream_version)
             packages[spn].repology_project_name = 
last_data[pn].repology_project_name
-
-    last_check = time.time()
diff --git a/calm/uploads.py b/calm/uploads.py
index 412bfe6..527495a 100644
--- a/calm/uploads.py
+++ b/calm/uploads.py
@@ -148,6 +148,10 @@ def scan(scandir, m, all_packages, args):
         if not files:
             continue
 
+        if len(splitpath) <= 2:
+            logging.warning("unexpected files %s which don't belong to any 
package" % files)
+            continue
+
         # two quick checks if the upload is allowed
         #
         # (removal is only controlled by these checks, uploads are more 
complex,

Reply via email to