summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py11
-rw-r--r--devel/views.py2
2 files changed, 6 insertions, 7 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index bb7d1005..e226d3a0 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -374,10 +374,9 @@ def db_update(archname, reponame, pkgs, force=False):
timestamp = None
# for a force, we don't want to update the timestamp.
# for a non-force, we don't want to do anything at all.
- if pkg_same_version(pkg, dbpkg):
- if not force:
- continue
- else:
+ if not force and pkg_same_version(pkg, dbpkg):
+ continue
+ elif not force:
timestamp = datetime.utcnow()
# The odd select_for_update song and dance here are to ensure
@@ -386,7 +385,7 @@ def db_update(archname, reponame, pkgs, force=False):
with transaction.commit_on_success():
# TODO Django 1.4 select_for_update() will work once released
dbpkg = select_pkg_for_update(dbpkg)
- if pkg_same_version(pkg, dbpkg):
+ if not force and pkg_same_version(pkg, dbpkg):
logger.debug("Package %s was already updated", pkg.name)
continue
logger.info("Updating package %s", pkg.name)
@@ -413,7 +412,7 @@ def filesonly_update(archname, reponame, pkgs, force=False):
with transaction.commit_on_success():
if not dbpkg.files_last_update or not dbpkg.last_update:
pass
- elif dbpkg.files_last_update > dbpkg.last_update:
+ elif not force and dbpkg.files_last_update > dbpkg.last_update:
logger.debug("Files for %s are up to date", pkg.name)
continue
# TODO Django 1.4 select_for_update() will work once released
diff --git a/devel/views.py b/devel/views.py
index b9bd7cce..c888871d 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -123,7 +123,7 @@ class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
- exclude = ['allowed_repos', 'user']
+ exclude = ('allowed_repos', 'user', 'latin_name')
@login_required
@never_cache